﻿using System.Windows;
using Microsoft.Phone.Controls;

namespace ZoomTextBoxPhoneSample
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void Button1Click(object sender, RoutedEventArgs e)
        {
            ZommTxt0.IsEnabled = !ZommTxt0.IsEnabled;
            ZommTxt1.IsEnabled = !ZommTxt1.IsEnabled;
            if (button1.Tag.ToString() == "1")
            {
                button1.Content = "Enable Controls";
                button1.Tag = "0";
            }
            else
            {
                button1.Content = "Disable Controls";
                button1.Tag = "1";
            }
        }

        private void BntZoomAddClick(object sender, RoutedEventArgs e)
        {
            ZommTxt0.CurrentZoomStep++;
            ZommTxt1.CurrentZoomStep++;
        }

        private void BntZoomSubClick(object sender, RoutedEventArgs e)
        {
            ZommTxt0.CurrentZoomStep--;
            ZommTxt1.CurrentZoomStep--;
        }
    }
}